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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: B = None
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

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

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