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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.t: D = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.p: F = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.o: B = None
        self.t: D = None
        self.w: E = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.p: F = None
        self.q: A = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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