class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: D = None
        self.y: E = None
        self.x: D = None
        self.t: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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