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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

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

e = A("e")
h = B("h")
b = C("b")
d = D("d")
c = E("c")
f = F("f")
m = G("m")
i = G("i")
j = F("j")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.s: B = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

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

e = A("e")
h = B("h")
b = C("b")
d = D("d")
c = E("c")
f = F("f")
m = G("m")
i = G("i")
j = F("j")

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