class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: F = None
        self.o: E = None
        self.t: C = None
        self.v: C = None
        self.p: F = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: F = None
        self.x: F = None
        self.p: E = None
        self.u: D = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: D = None
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.s: F = None
        self.x: F = None
        self.p: E = None
        self.u: D = None
        self.v: A = None
        self.w: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: D = None
        self.y: C = None
        self.r: A = None
        self.x: C = None
        self.w: G = None
        self.q: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: D = None
        self.txt = txt

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

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