class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: H = None
        self.r: H = None
        self.w: D = None
        self.q: D = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.v: G = None
        self.w: G = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.t: H = None
        self.p: A = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.x: H = None
        self.z: H = None
        self.w: D = None
        self.o: E = None
        self.p: H = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: F = None
        self.w: B = None
        self.q: F = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

f = A("f")
g = B("g")
b = C("b")
h = D("h")
a = E("a")
n = F("n")
c = G("c")
m = H("m")

f.u = h
f.x = h
f.w = h
f.q = h
f.s = h
f.v = m
f.r = m
f.t = g
g.u = h
g.x = m
g.s = m
g.v = c
g.w = c
g.z = f
b.r = g
b.t = g
h.s = m
h.o = g
h.r = a
h.q = b
a.v = g
a.z = c
a.o = c
a.t = m
a.p = f
a.y = b
n.v = h
n.w = h
n.u = c
n.x = m
n.z = m
n.p = m
n.o = a
n.r = g
c.u = m
c.r = n
c.q = n
c.y = n
c.w = g
c.v = h
m.u = h
m.y = n
m.x = b
m.q = g
assert m.y.r.u.r.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: D = None
        self.v: H = None
        self.r: H = None
        self.w: D = None
        self.q: D = None
        self.s: D = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: H = None
        self.v: G = None
        self.w: G = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: B = None
        self.r: E = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: G = None
        self.t: H = None
        self.p: A = None
        self.y: C = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: G = None
        self.x: H = None
        self.z: H = None
        self.w: D = None
        self.o: E = None
        self.p: H = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: F = None
        self.w: B = None
        self.q: F = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: F = None
        self.x: C = None
        self.q: B = None
        self.txt = txt

f = A("f")
g = B("g")
b = C("b")
h = D("h")
a = E("a")
n = F("n")
c = G("c")
m = H("m")

f.u = h
f.x = h
f.w = h
f.q = h
f.s = h
f.v = m
f.r = m
f.t = g
g.u = h
g.x = m
g.s = m
g.v = c
g.w = c
g.z = f
b.r = g
b.t = g
h.s = m
h.o = g
h.r = a
h.q = b
a.v = g
a.z = c
a.o = c
a.t = m
a.p = f
a.y = b
n.v = h
n.w = h
n.u = c
n.x = m
n.z = m
n.p = m
n.o = a
n.r = g
c.u = m
c.r = n
c.q = n
c.y = n
c.w = g
c.v = h
m.u = h
m.y = n
m.x = b
m.q = g
assert m.y.r.u.r.txt == "a"