class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: F = None
        self.v: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.p: F = None
        self.w: A = None
        self.x: C = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.y: B = None
        self.s: A = None
        self.v: F = None
        self.q: G = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.r: E = None
        self.u: B = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.z: C = None
        self.u: G = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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

f = A("f")
g = B("g")
m = C("m")
j = D("j")
e = E("e")
k = F("k")
l = G("l")
i = H("i")

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.y: G = None
        self.p: F = None
        self.w: A = None
        self.x: C = None
        self.o: F = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: G = None
        self.y: B = None
        self.s: A = None
        self.v: F = None
        self.q: G = None
        self.r: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: B = None
        self.r: E = None
        self.u: B = None
        self.y: G = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: C = None
        self.z: C = None
        self.u: G = None
        self.o: H = None
        self.t: A = None
        self.txt = txt

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

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

f = A("f")
g = B("g")
m = C("m")
j = D("j")
e = E("e")
k = F("k")
l = G("l")
i = H("i")

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