class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.q: F = None
        self.w: B = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

e = A("e")
d = B("d")
n = C("n")
m = D("m")
c = E("c")
a = F("a")
g = G("g")
k = C("k")
i = B("i")

e.x = g
d.s = n
d.p = i
d.w = i
d.y = i
d.q = a
d.t = g
n.s = g
n.t = e
n.q = e
n.r = e
n.z = c
n.v = c
n.y = i
m.q = g
m.o = g
m.p = n
m.y = c
m.z = c
m.v = a
m.x = a
c.u = e
c.q = a
c.z = a
a.s = c
g.x = m
k.s = g
k.t = e
k.q = e
k.r = e
k.z = c
k.v = c
k.y = i
i.s = n
i.p = d
i.w = d
i.y = d
i.q = a
i.t = g
assert e.x.x.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: B = None
        self.q: F = None
        self.w: B = None
        self.t: G = None
        self.y: B = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: F = None
        self.z: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

e = A("e")
d = B("d")
n = C("n")
m = D("m")
c = E("c")
a = F("a")
g = G("g")
k = C("k")
i = B("i")

e.x = g
d.s = n
d.p = i
d.w = i
d.y = i
d.q = a
d.t = g
n.s = g
n.t = e
n.q = e
n.r = e
n.z = c
n.v = c
n.y = i
m.q = g
m.o = g
m.p = n
m.y = c
m.z = c
m.v = a
m.x = a
c.u = e
c.q = a
c.z = a
a.s = c
g.x = m
k.s = g
k.t = e
k.q = e
k.r = e
k.z = c
k.v = c
k.y = i
i.s = n
i.p = d
i.w = d
i.y = d
i.q = a
i.t = g
assert e.x.x.y.txt == "c"