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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.t: E = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: H = None
        self.w: B = None
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.t: E = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: A = None
        self.w: F = None
        self.q: A = None
        self.txt = txt

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

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