class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.z: D = None
        self.t: C = None
        self.y: E = None
        self.p: H = None
        self.r: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.y: H = None
        self.p: A = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: E = None
        self.y: H = None
        self.p: A = None
        self.r: C = None
        self.w: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: B = None
        self.p: D = None
        self.r: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: F = None
        self.w: G = None
        self.txt = txt

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

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