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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

m = A("m")
i = B("i")
d = C("d")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
c = H("c")

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: F = None
        self.x: A = None
        self.z: D = None
        self.u: A = None
        self.txt = txt

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

m = A("m")
i = B("i")
d = C("d")
a = D("a")
l = E("l")
f = F("f")
j = G("j")
c = H("c")

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