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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.o: A = None
        self.q: D = None
        self.y: A = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: C = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

b = A("b")
e = B("e")
g = C("g")
f = D("f")
j = E("j")
n = F("n")
a = G("a")
k = B("k")

b.t = g
b.o = n
b.s = j
b.w = j
b.z = j
b.v = k
b.r = f
e.v = k
e.w = g
e.o = j
e.q = n
g.z = n
g.s = j
g.r = j
g.o = b
g.y = b
g.t = b
g.q = f
f.v = g
f.t = g
j.t = f
n.p = g
n.o = a
a.t = j
a.o = j
a.x = g
a.s = f
k.v = e
k.w = g
k.o = j
k.q = n
assert b.t.o.w.t.t.r.t.v.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.o: F = None
        self.s: E = None
        self.v: B = None
        self.w: E = None
        self.z: E = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: E = None
        self.o: A = None
        self.q: D = None
        self.y: A = None
        self.t: A = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: C = None
        self.s: D = None
        self.o: E = None
        self.txt = txt

b = A("b")
e = B("e")
g = C("g")
f = D("f")
j = E("j")
n = F("n")
a = G("a")
k = B("k")

b.t = g
b.o = n
b.s = j
b.w = j
b.z = j
b.v = k
b.r = f
e.v = k
e.w = g
e.o = j
e.q = n
g.z = n
g.s = j
g.r = j
g.o = b
g.y = b
g.t = b
g.q = f
f.v = g
f.t = g
j.t = f
n.p = g
n.o = a
a.t = j
a.o = j
a.x = g
a.s = f
k.v = e
k.w = g
k.o = j
k.q = n
assert b.t.o.w.t.t.r.t.v.txt == "g"