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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: D = None
        self.w: C = None
        self.y: E = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.y: D = None
        self.u: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: D = None
        self.w: C = None
        self.y: E = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

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

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