class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.z: G = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.o: B = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: C = None
        self.p: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.r: A = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: F = None
        self.u: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.z: G = None
        self.x: E = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: C = None
        self.o: B = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: C = None
        self.p: E = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.r: A = None
        self.t: D = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: B = None
        self.x: B = None
        self.txt = txt

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

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