class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: D = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.u: G = None
        self.r: F = None
        self.w: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.x: G = None
        self.v: F = None
        self.s: G = None
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: F = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: D = None
        self.u: G = None
        self.r: F = None
        self.w: F = None
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: C = None
        self.x: G = None
        self.v: F = None
        self.s: G = None
        self.r: G = None
        self.t: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.t: B = None
        self.u: A = None
        self.x: C = None
        self.txt = txt

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

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