class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: C = None
        self.u: B = None
        self.s: F = None
        self.q: E = None
        self.o: E = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: H = None
        self.p: B = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.t: C = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.w: C = None
        self.r: F = None
        self.q: H = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: H = None
        self.p: B = None
        self.q: D = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: C = None
        self.t: C = None
        self.w: E = None
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: F = None
        self.w: C = None
        self.r: F = None
        self.q: H = None
        self.y: A = None
        self.v: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.txt = txt

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

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