class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.w: D = None
        self.o: F = None
        self.s: D = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.v: E = None
        self.t: C = None
        self.u: F = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: F = None
        self.v: E = None
        self.t: C = None
        self.u: F = None
        self.w: G = None
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: E = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

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

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