class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: E = None
        self.r: D = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.p: G = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.w: A = None
        self.p: H = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: F = None
        self.p: G = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.r: E = None
        self.q: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.t: A = None
        self.w: A = None
        self.p: H = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: A = None
        self.txt = txt

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

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

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